import requests

from util.useragent import get_headers_init_user_agent

# 下拉刷新
# """https://api.bilibili.com/x/web-interface/wbi/index/top/feed/rcmd?web_location=1430650&ps=12"""
# 点击换一换
# """https://api.bilibili.com/x/web-interface/wbi/index/top/feed/rcmd?web_location=1430650&ps=10"""


url = 'https://api.bilibili.com/x/web-interface/wbi/index/top/feed/rcmd?web_location=1430650&y_num=4&fresh_type=3&feed_version=V8&fresh_idx_1h=1&fetch_row=1&fresh_idx=1&brush=0&device=win&homepage_ver=1&ps=10&last_y_num=4&screen=1212-238&seo_info=&tt_exp=&uniq_id=1686195709100&w_rid=76c73da1341413f0d018f04c9cd0a51d&wts=1761803618'
headers = {
            'User-Agent': get_headers_init_user_agent()
        }
response = requests.get(url, headers=headers)
datas = response.json()['data']['item']
for data in datas:
    title = data['title']
    print(title)



